package com.ws.process;

import java.util.NoSuchElementException;

/*
使用switch-case判断分数是否合格

 */
public class SwitchCaseTest2 {
    public static void main(String[] args) {

        int score = 78;

        /*
        多个输出的值相同可以进行合并
         */
        switch (score / 10) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
                System.out.println("不及格");
                break;
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
                System.out.println("及格");
                break;
        }

        //优解
        switch (score / 60) {
            case 0:
                System.out.println("不及格");
            case 1:
                System.out.println("及格");
        }


    }
}
